package wodegua.d31_java高级.d2_reflect;

/**
 * 获取Class对象的三种方式
 * 1、Class c1=类名.class
 * 2、调用Class提供方法:public static Class forName(String package);
 * 3、Object提供的方法:public Class getClass();Class c3=对象.getClass();
 */
public class Test1Class  {
    public static void main(String[] args) throws Exception {
        Class c1 = Student.class;
        System.out.println(c1);

        Class c2 = Class.forName("wodegua.d31_java高级.d2_reflect.Student");
        System.out.println(c2);

        Student student = new Student();
        Class c3 = student.getClass();
        System.out.println(c3);
    }
}
